<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>S6办公系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
function fun(){
	
	var p =document.getElementById('pa').value;
	var title =document.getElementById("title").value.length;
	if(p<=0&&title<=0){
		alert('标题或收件人不能为空');
		}else if(p<=0){
		alert('收件人不能为空');
		}else if(title<=0){
			alert('标题不能为空');
			}

	}
</script>
</head>

<body style="background-color:#D6D3C9;">
<table>
<tr>
<td>标题：</td>
<td><input type="text" id="title" /></td>
</tr>
<tr>
<td>发件人：</td>
<td><p>张三</p></td>
</tr>
<tr>
<td>收件人：</td>
<td><input type="text"  id="pa"/></td>
</tr>
<tr>
<td>内容：</td>
<td><textarea name="" cols="20" rows="5" ></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="file" /></td>
</tr>
<tr>
<td colspan="2"><input type="button" value="发送" onclick="fun()" /></td>
</tr>
</table>
</body>
</html>